package com.yupi.springbootinit.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.springbootinit.common.DeleteRequest;
import com.yupi.springbootinit.model.dto.unit.UnitAddRequest;
import com.yupi.springbootinit.model.dto.unit.UnitQueryRequest;
import com.yupi.springbootinit.model.dto.unit.UnitUpdateRequest;
import com.yupi.springbootinit.model.entity.Unit;

import java.util.List;

/**
* @author zlc
* @description 针对表【unit(单位信息表)】的数据库操作Service
* @createDate 2024-07-23 16:17:31
*/
public interface UnitService extends IService<Unit> {

    long addUnit(UnitAddRequest unitAddRequest);

    boolean deleteUnit(DeleteRequest deleteRequest);

    boolean updateUnit(UnitUpdateRequest unitUpdateRequest);

    Unit getUnitById(long id);

    List<Unit> listUnit(UnitQueryRequest unitQueryRequest);

    Page<Unit> listUnitByPage(UnitQueryRequest unitQueryRequest);
}
